package com.occupation_health.common;

import java.util.Date;

/*
 *提供各种常用函数 
 */
public class function {
	/*
	 *获取精确到秒的时间戳 
	 * @param date 
	 * @return 
	 */  
	public static int getSecondTimestampTwo(Date date){  
	    if (null == date) {  
	        return 0;  
	    }  
	    String timestamp = String.valueOf(date.getTime()/1000);  
	    return Integer.valueOf(timestamp);  
	}  

}
